package com.ouc.pampas;

import com.google.common.base.Charsets;

public abstract interface FileLoader {
	public abstract Resp load(String paramString);

	public abstract Resp load(String paramString1, String paramString2);

	public static class Resp {
		public static final Resp NOT_FOUND = new Resp();
		public static final Resp NOT_MODIFIED = new Resp();
		private boolean notFound;
		private boolean notModified;
		private String sign;
		private byte[] context;

		static {
			NOT_FOUND.notFound = true;
			NOT_MODIFIED.notModified = true;
		}

		public boolean isNotFound() {
			return this.notFound;
		}

		public void setNotFound(boolean notFound) {
			this.notFound = notFound;
		}

		public boolean isNotModified() {
			return this.notModified;
		}

		public void setNotModified(boolean notModified) {
			this.notModified = notModified;
		}

		public String getSign() {
			return this.sign;
		}

		public void setSign(String sign) {
			this.sign = sign;
		}

		public byte[] getContext() {
			return this.context;
		}

		public void setContext(byte[] context) {
			this.context = context;
		}

		public String asString() {
			return new String(this.context, Charsets.UTF_8);
		}
	}
}
